package com.lzy.huijinjiazu.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.lzy.huijinjiazu.mvp.contract.SearchSuccessContract;
import com.lzy.huijinjiazu.mvp.model.SearchSuccessModel;


@Module
public class SearchSuccessModule {
    private SearchSuccessContract.View view;

    /**
     * 构建SearchSuccessModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public SearchSuccessModule(SearchSuccessContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    SearchSuccessContract.View provideSearchSuccessView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    SearchSuccessContract.Model provideSearchSuccessModel(SearchSuccessModel model) {
        return model;
    }
}